package spring.bean;

import java.io.IOError;
import java.io.IOException;

public class DependentBean {
    ResourceBean resourceBean;

    public void write(String ss) throws IOError, IOException {
        System.out.println("DependentBean====write");
        resourceBean.getFos().write(ss.getBytes());
    }

    public void init() throws Exception {
        System.out.println("DependentBean:===init");
        resourceBean.getFos().write("dependentBean:===init".getBytes());


    }

    public void destroy() throws IOException {
        System.out.println("dependentBean:===destroy");
        resourceBean.getFos().write("dependentBean==destroy".getBytes());

    }

    public ResourceBean getResourceBean() {
        return resourceBean;
    }

    public void setResourceBean(ResourceBean resourceBean) {
        this.resourceBean = resourceBean;
    }

}
